package com.njtoyo.taxi.admin.rest.controller.open;

import com.njtoyo.taxi.admin.rest.wrapper.open.CoordinatesWrapper;
import com.njtoyo.taxi.admin.service.open.ToolService;
import com.taxi.entity.common.RestResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

@RestController
@Api(value = "行程管理", tags = {"行程管理"})
@RequestMapping("open/tool")
public class ToolController {
    @Autowired
    private ToolService rideService;

    @GetMapping("/distance")
    @ApiOperation(value = "计算距离", notes = "计算距离,无权限")
    RestResult coordinates(@Valid CoordinatesWrapper wrapper) {
        return rideService.coordinates(wrapper);
    }
}
